package com.pp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pp.common.pojo.Location;
import com.pp.common.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface LocationMapper extends BaseMapper<Location> {

    @Select("SELECT location.address FROM `user`\n" +
            "INNER JOIN location\n" +
            "ON `user`.id = location.user_id\n" +
            "WHERE `user`.id=#{id}")
    String selectUserAddress(@Param("id") Integer id);
}
